#ifndef Shared_Memory_Model_L2_cache_h
#define Shared_Memory_Model_L2_cache_h

#define ModifyFreq 7
#define InvalidateFreq 1

using namespace std;

class L1_data_cache;
class L1_instruction_cache;

class L2_cache {

private:

    unsigned int modifiedCounter;   
    unsigned int readCounter;
    unsigned int writeCounter; 

public:    

    L1_data_cache *data_cache;
    L1_instruction_cache *inst_cache;    

    L2_cache();
    void readRequest(unsigned int addr, unsigned int* data);
    void writeRequest(unsigned int addr, unsigned int data);
    void invalidateDataCache(unsigned int addr);
    void dataCacheModified(unsigned int addr);
    
};

#endif
